package cz.proks.easyhelpdesk.gwt.ui.widget;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Widget;

public class Counter extends Composite {

    private static CounterUiBinder uiBinder = GWT.create(CounterUiBinder.class);

    interface CounterUiBinder extends UiBinder<Widget, Counter> {
    }

    @UiField Label startCount;
    @UiField Label endCount;
    @UiField Label complexCount;
    
    public Counter() {
        initWidget(uiBinder.createAndBindUi(this));
        setStartCount(0l);
        setEndCount(0l);
        setComplexCount(0l);
    }
    
    public Long getStartCount() {
        return Long.valueOf(startCount.getText());
    }
    
    public void setStartCount(Long value) {
        startCount.setText(String.valueOf(value));
    }
    
    public Long getEndCount() {
        return Long.valueOf(endCount.getText());
    }
    
    public void setEndCount(Long value) {
        endCount.setText(String.valueOf(value));
    }
    
    public Long getComplexCount() {
        return Long.valueOf(complexCount.getText());
    }
    
    public void setComplexCount(Long value) {
        complexCount.setText(String.valueOf(value));
    }

}
